package com.geek.proxy.cglib;

import com.geek.proxy.entity.Singer;
import com.geek.proxy.entity.impl.TestSinger;
import net.sf.cglib.proxy.Enhancer;

public class ProxyTest {

	public static void main(String[] args) {

		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(TestSinger.class);

		enhancer.setCallback(new MyInterceptor());

		Singer target = (Singer) enhancer.create();
		target.sing();
	}

}
